home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tpu2tps.zip / SYSTEM.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-23  |  1KB  |  42 lines

  1.  
  2. unit System;
  3.  
  4. { This is a dummy system unit, which does almost nothing. }
  5.  
  6. interface
  7.  
  8. var                              { TP needs a public var & const block }
  9.   static_var  : byte;
  10. const
  11.   const_var   : byte = 0;
  12.  
  13. implementation
  14.  
  15. { These routines must be declared in the right order (the compiler calls
  16.   them by number, not by name) and must be far.  In the TP 6.0 SYSTEM.TPU there
  17.   are 137 of them; buy the RTL source if you want to know what they do.  Coding
  18.   the other 134 stubs would be a good idea, but I couldn't be bothered. }
  19.  
  20. procedure InitTurbo; far; assembler;
  21. asm
  22.   mov dx, seg(const_var)
  23.   mov ds,dx                { Load DS }
  24.   mov al,const_var         { We have to be sure the var's & const's get linked
  25.                              in }
  26.   mov static_var,al
  27. end;
  28.  
  29. procedure HaltError; far; assembler;
  30. asm
  31.   mov ax,$4c01
  32.   int $21             { Halt with exit code 1 }
  33. end;
  34.  
  35. procedure HaltTurbo; far; assembler;
  36. asm
  37.   mov ax,$4c00
  38.   int $21             { Halt with exit code 0 }
  39. end;
  40.  
  41. end.
  42.